package com.example.demo.controller;

import com.example.demo.dto.PageLimit;
import com.example.demo.pojo.People;
import com.example.demo.server.PeopleServer;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/people")
public class PeopleController {
    @Resource
    PeopleServer peopleServer;

    @RequestMapping("info")
    public List<People> selectAllPeople(PageLimit pageLimit){
        return peopleServer.selectAllPeople(pageLimit);
    }

}
